//
//
//  WCLRecordEngine.h
//  WCL
//
//  Created by WangZhenyu on 2020/12/4.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <AVFoundation/AVCaptureVideoPreviewLayer.h>

@class WCLRecordEngine;
@class CustomRecordModel;

@protocol WCLRecordEngineDelegate <NSObject>
@optional
- (void)recordProgress:(CGFloat)progress;
- (void)recordStopPlayer;
- (void)voiceRecorded:(NSData *)frame;

@end

@class TYLevelPairs;

@interface WCLRecordEngine : NSObject

@property (nonatomic, strong) CustomRecordModel *recordModel;
@property (atomic, assign, readonly) BOOL isCapturing;//正在录制
@property (atomic, assign, readonly) BOOL isPaused;//是否暂停
@property (atomic, assign, readonly) CGFloat currentRecordTime;//当前录制时间
@property (atomic, assign) CGFloat maxRecordTime;//录制最长时间
@property (weak, nonatomic) id<WCLRecordEngineDelegate>delegate;
@property (atomic, strong) NSString *audioPath;//音频路径
@property (nonatomic, assign) BOOL needSave;//是否保存录音
@property (nonatomic, copy  ) NSString *typeStr;//录音模式类型

//启动录制功能
- (void)startUp;
//关闭录制功能
- (void)shutdown;
//开始录制
- (void) startCapture;
//暂停录制
- (void) pauseCapture;
//停止录制
- (void) stopCaptureHandler:(void (^)(NSString *audioPath, LocalRecordModel *model))handler;
//继续录制
- (void) resumeCapture;

- (TYLevelPairs *)levels;
- (void)stopVoiceQueue;
@end
